#include<iostream>
#include"BinarySearchTree.h"
#include<vector>
//引入库

int main(int argc,char* argv[])
{
  BinarySearchTree<float> testtree;
  testtree.insert(0);
  testtree.insert(5);
  testtree.insert(10);

  std::cout<<"试试类有没有问题"<<std::endl;
  cout<<testtree.contains(0)<<endl;
  cout<<testtree.contains(5)<<endl;
  cout<<testtree.contains(10)<<endl;
  cout<<testtree.contains(15)<<endl;
  cout<<"输出应该为1110"<<endl;

  cout<<"print 试试 \t 求最大最小我没写 就不测了"<<endl;
  testtree.printTree();
  testtree.remove(5);
  testtree.printtree();
  cout<<"上面是原树的print，下面是去掉5的print"<<endl;

  cout<<"测试一下作业里的东西"<<endl;
  BinarySearchTree<double> tes;
  vector<double> data;
  //push这个很有压弹匣的感觉...不过一直复制粘贴来写这种手动压数据的好烦...下次研究一下能不能直接从文件里读取数据
  data.push_back(0);
  data.push_back(1);
  data.push_back(2);
  data.push_back(3);
  data.push_back(4);

  cout<<"我们压入了1.2.3.4.0进行测试"<<endl;
  data = tes.BST_sort(data);
  cout<<"接下来展示树里面和vector里面的内容确认是否有问题"<<endl;
  tes.printTree();
  for(int i = 0;i< data.size();i++)
    cout<< data[i] << endl;

  cout<<"测试一下第二项作业里的东西"<<endl;
  data = tes.Randomized_BST_sort(data);
  cout<<"让我康康！"<<endl;
  tes.printTree();
  cout<<"杰哥不要！"<<cout;//只是拿来分割一下，别介意
    for(int i = 0;i< data.size();i++)
      cout<< data[i] << endl;
 }
